<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<head>
<title>学生成绩管理系统</title>
<link rel="stylesheet" type="text/css" id="css" href="../style/main.css" />
<link rel="stylesheet" type="text/css" id="css"
	href="../style/style1.css" />
<link rel="stylesheet" type="text/css" id="css"
	href="../style/style.css" />

<style type="text/css">
<!--
table {
	border-spacing: 1px;
	border: 1px solid #A2C0DA;
}

td, th {
	padding: 2px 5px;
	border-collapse: collapse;
	text-align: left;
	font-weight: normal;
}

thead tr th {
	height: 50px;
	background: #B0D1FC;
	border: 1px solid white;
}

thead tr th.line1 {
	background: #D3E5FD;
}

thead tr th.line4 {
	background: #C6C6C6;
}

tbody tr td {
	height: 35px;
	background: #CBE2FB;
	border: 1px solid white;
	vertical-align: middle;
}

tbody tr td.line4 {
	background: #D5D6D8;
}

tbody tr th {
	height: 35px;
	background: #DFEDFF;
	border: 1px solid white;
	vertical-align: middle;
}

tfoot tr td {
	height: 35px;
	background: #FFFFFF;
	border: 1px solid white;
	vertical-align: middle;
}
-->
</style>

<script type="text/javascript" src="../js/common.js"></script>
</head>
<c:if test="${!(empty sessionScope.message)}">
	<script type="text/javascript">
		alert('<c:out value="${sessionScope.message}"/>');
	</script>
	<c:remove var="message" scope="session" />
</c:if>
<body>
	<div id="btm">
		<div id="main">

			<div id="header">
				<div id="top"></div>
				<div id="logo">
					<h1>成绩管理</h1>
				</div>
				<div id="mainnav">
					<ul>
						<li><a href="teacherIndex.jsp">首页</a></li>
						<li><a href="tcServlet?action=list">开设课程</a></li>
						<li><a href="tcServlet?action=checkGrade">成绩提交</a></li>
						<li><a href="tcServlet?action=showTeacher">信息查询</a></li>
						<li><a href="changePwd.jsp">密码修改</a></li>
						<li><a href="../logoutServlet">退出</a></li>
					</ul>
					<span id="right"> <c:choose>
							<c:when test="${sessionScope.user.userType==1}">
								<font color=red>状态：已登录&nbsp;&nbsp;用户类别：教师用户&nbsp;&nbsp;用户名：${sessionScope.user.name}&nbsp;&nbsp;</font>
							</c:when>

							<c:otherwise>
								<font color=red>状态：未登录&nbsp;&nbsp;</font>
							</c:otherwise>
						</c:choose>
					</span>
				</div>
			</div>
			<div id="content" align="center">
				<div id="center">
					<BR /> <BR />
					<form method="post" action="#">
						<table width="800" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<td width="75%"><h4 align="center">
										开设课程信息如下&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									</h4></td>
							</tr>
							<tr>
								<td colspan="2" width="100%">
									<table width="100%">
										<thead>
											<tr>
												<th width="15%" align="center" scope="col" colspan="2"><b>课程编号</b>
												</th>
												<th width="15%" align="center" scope="col" colspan="2"><b>课程名称</b>
												</th>
												<th width="15%" align="center" scope="col" colspan="2"><b>教学班号</b>
												</th>
												<th width="15%" align="center" scope="col" colspan="2"><b>课程容量</b>
												</th>
												<th width="15%" align="center" scope="col" colspan="2"><b>已选人数</b>
												</th>
												<th width="15%" align="center" colspan="2"><b>操作</b></th>
											</tr>
										</thead>

										<tbody>
											<c:forEach items="${requestScope.list}" var="teacherC">
												<tr>
													<td width="15%" align="center" colspan="2">
														${teacherC.courseNo }</td>
													<td width="15%" align="center" colspan="2">
														${teacherC.courseName }</td>
													<td width="15%" align="center" colspan="2">
														${teacherC.tcTeacherNo }</td>
													<td width="15%" align="center" colspan="2">
														${teacherC.tcCapacity }</td>
													<td width="15%" align="center" colspan="2">
														${teacherC.tcSel }</td>
													<td width="15%" align="center" colspan="2"><a
														href='<c:url value="tcServlet?action=showGrade&courseNo=${teacherC.courseNo }&teacherNo=${teacherC.teacherNo}&tcTeacherNo=${teacherC.tcTeacherNo }"></c:url>'><font
															color=red>提交/查看成绩</font></a></td>
												</tr>
											</c:forEach>

										</tbody>
										<tbody>
											<tr>
												<td align="center" colspan="12"><c:if
														test="${requestScope.pageCount!=0&&requestScope.curPage!=1}">
														<a href='<c:url value="tcServlet?action=checkGrade&curPage=1"/>'>首页</a>
														<a
															href='<c:url value="tcServlet?action=checkGrade&curPage=${requestScope.curPage-1}"/>'>前一页</a>
													</c:if> <c:if
														test="${requestScope.pageCount==0||requestScope.curPage==1}">首页 前一页</c:if>
													<c:if
														test="${requestScope.pageCount!=0&&requestScope.curPage!=requestScope.pageCount}">
														<a
															href='<c:url value="tcServlet?action=checkGrade&curPage=${requestScope.curPage+1}"/>'>下一页</a>
														<a
															href='<c:url value="tcServlet?action=checkGrade&curPage=${requestScope.pageCount}"/>'>尾页</a>
													</c:if> <c:if
														test="${requestScope.pageCount==0||requestScope.curPage==requestScope.pageCount}">下一页 尾页</c:if>
													&nbsp;
													第${requestScope.curPage}页/共${requestScope.pageCount}页
													&nbsp;</td>
											</tr>
										</tbody>

									</table>
								</td>
							</tr>
						</table>
					</form>
				</div>



			</div>

			<div id="footer">
				<div id="copyright">
					<div id="copy">
						<p align="center">CopyRight&copy;2010</p>
						<p>南京晓庄学院信息工程学院</p>
					</div>
				</div>
				<div id="bgbottom"></div>
			</div>

		</div>
	</div>
</body>
</html>
